package com.wuhanins.insmytestdemo.domainService.provider;

import com.wuhanins.common.utils.ComStatic;
import com.wuhanins.core.proxy.ProviderContext;

import java.util.HashMap;
import java.util.Map;

public class MiPContext extends ProviderContext {

    public static MiPContext getInstance() {
        return new MiPContext();
    }

    public MiPContext() {
        initHost();
        setCharset("UTF-8");
        this.setIHttpStateCheck(new V4_StateChecker());
    }

    @Override
    public Map<String, String> getHeaderList() {
        Map<String, String> mHeaders = new HashMap<>();
//        String asToken = BaseSharedPreference.getInstance().getToken();
//        mHeaders.put("Authorization","Bearer " + asToken);
        return mHeaders;
    }

    private void initHost() {
//        this.setHost(
//                "http://192.168.8.230:8033/"
//        );
        this.setHost(
                "http://111.46.76.96:10036/"
        );
//        this.setHost(
//                "http://172.18.35.233:10036/"
//        );
    }


    @Override
    public String getDateTimeFormat() {
        return ComStatic.DATETIME_FORMAT_HTTP_YMD_HMS;
    }

}
